﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Kiiro.SiteDefinition.MasterPage;

namespace Kiiro.SiteDefinition.ControlTemplates
{
    public partial class AppendWebPartZone : KiiroUserControl
    {
        protected override void OnPreRender ( EventArgs e )
        {
            base.OnPreRender ( e );

            if ( appendWebPartZone.WebParts.Count > 0 )
            {
                KiiroMaster master = ( KiiroMaster ) Page.Master;
                bool wrap = master.NavigationSub.HasTabs;

                litPrependWrapper.Text = "<div id='wpz' class='body-pad'><div class='body'>";
                if (wrap)
                    litPrependWrapper.Text += "<div class='wr'>";                
                litPrependWrapper.Text += "<div class='ap'><div class='wpz-content'>";

                litAppendWrapper.Text = "</div></div></div></div>";
                if ( wrap )
                    litAppendWrapper.Text += "</div>";
            }
        }
    }
}

/*************************************************************************
 * 
 * $Log: /Internal Projects/Kiiro/Kiiro.SiteDefinition/12/TEMPLATE/CONTROLTEMPLATES/Kiiro/AppendWebPartZone.ascx.cs $
 * 
 * 4     2/12/10 9:14a Camerons
 * 
 * 3     1/14/10 12:46p Camerons
 * 
 **************************************************************************/